-- GENERATED SPELL FOR [Great Goretusk] --


function spell0_547(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17256,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_547', 631, 1)
end

function spell1_547(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1753,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_547', 0, 1)
end

function spell2_547(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_547', 0, 1)
end

function spell3_547(pUnit, Event) --@Rushing Charge,Self--
pUnit:FullCastSpellOnTarget(6268,pUnit)
pUnit:RegisterEvent('Sorts_547', 3000, 1)
end

function Sorts_547(pUnit, Event)
local choix_sorts_547 = math.random(0, 3)
if choix_sorts_547 == 0 then
pUnit:RegisterEvent('spell0_547', 1, 1)
end
if choix_sorts_547 == 1 then
pUnit:RegisterEvent('spell1_547', 1, 1)
end
if choix_sorts_547 == 2 then
pUnit:RegisterEvent('spell2_547', 1, 1)
end
if choix_sorts_547 == 3 then
pUnit:RegisterEvent('spell3_547', 1, 1)
end
end

function mob547_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_547', math.random(1500, 3000), 1)
end

function mob547_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob547_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob547_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(547, 1, 'mob547_Action')
RegisterUnitEvent(547, 2, 'mob547_Leave')
RegisterUnitEvent(547, 3, 'mob547_Kill')
RegisterUnitEvent(547, 4, 'mob547_Die')
